import time

from crawler.connection import redis_shedana, redis_conn, filter_push_redis

url_list = [
    {'sex': 'women', 'uri': 't9nspl0', 'category': 'Shoes>>Iconic-styles'},
    {'sex': 'women', 'uri': 'trkubgg', 'category': 'Shoes>>Seasonal-selection'},
    {'sex': 'women', 'uri': 't8qyp09', 'category': 'Shoes>>Lv-shake'},
    {'sex': 'women', 'uri': 'ta9mjqt', 'category': 'Shoes>>Louis-vuitton-x-yayoi-kusama-shoe'},
    {'sex': 'men', 'uri': 't1l3uzbm', 'category': 'Shoes>>Modern-classics'},
    {'sex': 'men', 'uri': 'thbekpq', 'category': 'Shoes>>Lv-trainers'},
    {'sex': 'women', 'uri': 't13nbknz', 'category': 'Shoes>>Sneakers'},
    {'sex': 'women', 'uri': 't1lkbycc', 'category': 'Shoes>>Mules-and-slides'},
    {'sex': 'women', 'uri': 't1wpeudq', 'category': 'Shoes>>Pumps'},
    {'sex': 'women', 'uri': 't1ey0zdr', 'category': 'Shoes>>Sandals'},
    {'sex': 'women', 'uri': 't1is1ifz', 'category': 'Shoes>>Ankle-boots-and-boots'},
    {'sex': 'women', 'uri': 't18l8jj3', 'category': 'Shoes>>Loafers-and-ballerinas'},
    {'sex': 'women', 'uri': 'twh7u2z', 'category': 'Shoes>>Platform-shoes'},
    {'sex': 'men', 'uri': 't1fud07g', 'category': 'Shoes>>Sneakers'},
    {'sex': 'men', 'uri': 't1x4h6di', 'category': 'Shoes>>Loafers-and-moccasins'},
    {'sex': 'men', 'uri': 'tra4xg2', 'category': 'Shoes>>Lace-ups-and-buckle-shoes'},
    {'sex': 'men', 'uri': 'tp5lgyh', 'category': 'Shoes>>Ankle-boots-and-boots'},
    {'sex': 'men', 'uri': 't1c9fsss', 'category': 'Shoes>>Sandals'},
    {'sex': 'women', 'uri': 't1wyh5qg', 'category': 'Bags>>Twist'},
    {'sex': 'women', 'uri': 't1256g84', 'category': 'Bags>>Coussin'},
    {'sex': 'women', 'uri': 't19vydzd', 'category': 'Bags>>Dauphine'},
    {'sex': 'women', 'uri': 't1wj1ia5', 'category': 'Bags>>Petite-malle'},
    {'sex': 'women', 'uri': 't4q7vh0', 'category': 'Bags>>Louis-vuitton-x-yayoi-kusama-handbags'},
    {'sex': 'men', 'uri': 'tupcpw6', 'category': 'Bags>>Keepall'},
    {'sex': 'men', 'uri': 't1rjid0', 'category': 'Bags>>Soft-trunk-bags'},
    {'sex': 'men', 'uri': 't1mddoj7', 'category': 'Bags>>Christopher'},
    {'sex': 'men', 'uri': 't1y9vjj2', 'category': 'Bags>>Exotic-leather-bags'},
    {'sex': 'men', 'uri': 'tx0u42m', 'category': 'Bags>>Bags-louis-vuitton-x-yayoi-kusama-for-men'},
    {'sex': 'women', 'uri': 'tic3lrz', 'category': 'Bags>>Twist'},
    {'sex': 'women', 'uri': 'tkfqvgi', 'category': 'Bags>>Coussin'},
    {'sex': 'women', 'uri': 't10ujhxu', 'category': 'Bags>>Dauphine'},
    {'sex': 'women', 'uri': 't1v6va27', 'category': 'Bags>>Petite-malle'},
    {'sex': 'women', 'uri': 'teuyskt', 'category': 'Bags>>Louis-vuitton-x-yayoi-kusama-handbags'},
    {'sex': 'women', 'uri': 't1hngzgu', 'category': 'Bags>>Louis-vuitton-x-yayoi-kusama-travel-bags'},
    {'sex': 'men', 'uri': 'tw6b1m', 'category': 'Bags>>Keepall'},
    {'sex': 'men', 'uri': 't720gpl', 'category': 'Bags>>Soft-trunk-bags'},
    {'sex': 'men', 'uri': 't1vyycfk', 'category': 'Bags>>Christopher'},
    {'sex': 'men', 'uri': 'tqom6uq', 'category': 'Bags>>Exotic-leather-bags'},
    {'sex': 'men', 'uri': 't61dy55', 'category': 'Bags>>Bags-louis-vuitton-x-yayoi-kusama-for-me'},
    {'sex': 'women', 'uri': 't12t1dix', 'category': 'Bags>>Iconic-monogram-bags'},
    {'sex': 'women', 'uri': 't4khejh', 'category': 'Bags>>Leather-bags-selection'},
    {'sex': 'women', 'uri': 't163byw4', 'category': 'Bags>>Shoulder-bags-and-cross-body-bags'},
    {'sex': 'women', 'uri': 't1gawaua', 'category': 'Bags>>Totes/_/n-t1gawaua'},
    {'sex': 'women', 'uri': 't1g0rpe7', 'category': 'Bags>>Chain-bags-and-clutches'},
    {'sex': 'women', 'uri': 't12j1sai', 'category': 'Bags>>Mini-bags'},
    {'sex': 'women', 'uri': 't1ajodc8', 'category': 'Bags>>Exotic-leather-bags'},
    {'sex': 'women', 'uri': 't1vjnc33', 'category': 'Bags>>Straps'},
    {'sex': 'men', 'uri': 't1m53pqg', 'category': 'Bags>>Leather-bags'},
    {'sex': 'men', 'uri': 'tnwslsb', 'category': 'Bags>>Iconic-monogram-bags'},
    {'sex': 'men', 'uri': 't1457ela', 'category': 'Bags>>Damier-signature-bags'},
    {'sex': 'men', 'uri': 'tq8x56v', 'category': 'Bags>>Backpacks'},
    {'sex': 'men', 'uri': 't1u6ktha', 'category': 'Bags>>Cross-body-bags'},
    {'sex': 'men', 'uri': 't1u6qxz2', 'category': 'Bags>>Business-bags'},
    {'sex': 'men', 'uri': 't1qqq5dr', 'category': 'Bags>>Tote-bags'},
    {'sex': 'men', 'uri': 'tsg5web', 'category': 'Bags>>Small-bags-and-belt-bags'},
    {'sex': 'women', 'uri': 'tfr7qdp', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 'tbdtom7', 'category': 'Bags>>Handbagss'},
    {'sex': 'women', 'uri': 't1qhwjt3', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 'tsrk38e', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 'th1qw6u', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 't1mb9cp', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 'tptbe01', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 'tp0i0jt', 'category': 'Bags>>Handbags'},
    {'sex': 'women', 'uri': 't5c4cn1', 'category': 'Bags>>Handbags'},
    {'sex': 'men', 'uri': 't1gza3m5', 'category': 'Bags>>Leather-bags'},
    {'sex': 'men', 'uri': 'taeo5qx', 'category': 'Bags>>Iconic-monogram-bags'},
    {'sex': 'men', 'uri': 'tn65vv5', 'category': 'Bags>>Damier-signature-bags'},
    {'sex': 'men', 'uri': 't7ipiak', 'category': 'Bags>>Backpacks'},
    {'sex': 'men', 'uri': 't1bmxkvj', 'category': 'Bags>>Cross-body-bags'},
    {'sex': 'men', 'uri': 't7dnshy', 'category': 'Bags>>Business-bags'},
    {'sex': 'men', 'uri': 't1ixjs8n', 'category': 'Bags>>Tote-bags'},
    {'sex': 'men', 'uri': 't1pizyia', 'category': 'Bags>>Small-bags-and-belt-bags'},
    {'sex': 'women', 'uri': 't12h8cqk', 'category': 'Accessories>>The-essentials'},
    {'sex': 'women', 'uri': 't1lxxget', 'category': 'Accessories>>Beach-essentials'},
    {'sex': 'women', 'uri': 't178rect', 'category': 'Accessories>>Louis-vuitton-x-yayoi-kusama-accessories'},
    {'sex': 'men', 'uri': 't1q7c75u', 'category': 'Accessories>>The-essentials'},
    {'sex': 'men', 'uri': 'tb60ogf', 'category': 'Accessories>>Spring-summer-selection'},
    {'sex': 'men', 'uri': 'tv424tj', 'category': 'Accessories>>Accessories-louis-vuitton-x-yayoi-kusama-for-men'},
    {'sex': 'women', 'uri': 'toyetr6', 'category': 'Accessories>>Shawls-and-stoles'},
    {'sex': 'women', 'uri': 'tmr7ugu', 'category': 'Accessories>>Scarves'},
    {'sex': 'women', 'uri': 'tte63om', 'category': 'Accessories>>Silk-squares-and-bandeaux'},
    {'sex': 'women', 'uri': 'ty346sh', 'category': 'Accessories>>Belts'},
    {'sex': 'women', 'uri': 't1peha6j', 'category': 'Accessories>>Sunglasses'},
    {'sex': 'women', 'uri': 'tmixwg8', 'category': 'Accessories>>Hats-and-gloves'},
    {'sex': 'women', 'uri': 't2yokvy', 'category': 'Accessories>>Home-textiles'},
    {'sex': 'women', 'uri': 'tui7c0x', 'category': 'Accessories>>Key-holders-and-bag-charms'},
    {'sex': 'women', 'uri': 't1ydxwto', 'category': 'Accessories>>Hair-accessories'},
    {'sex': 'women', 'uri': 'tcd4ic8', 'category': 'Accessories>>Tech-accessories'},
    {'sex': 'men', 'uri': 't1g9dx5w', 'category': 'Accessories>>Belts'},
    {'sex': 'men', 'uri': 'tl80g0l', 'category': 'Accessories>>Fashion-jewellery'},
    {'sex': 'men', 'uri': 't194fv1y', 'category': 'Accessories>>Sunglasses'},
    {'sex': 'men', 'uri': 't186w8xz', 'category': 'Accessories>>Scarves'},
    {'sex': 'men', 'uri': 't1fq44ws', 'category': 'Accessories>>Hats-and-gloves'},
    {'sex': 'men', 'uri': 'tv1f2za', 'category': 'Accessories>>Ties-and-pocket-squares'},
    {'sex': 'men', 'uri': 'tzumbbt', 'category': 'Accessories>>Key-holders-and-bag-charms'},
    {'sex': 'men', 'uri': 'tblw1mp', 'category': 'Accessories>>Home-textiles'},
    {'sex': 'men', 'uri': 'tjfx2w6', 'category': 'Accessories>>Tech-accessories'},
    {'sex': 'women', 'uri': 'tfrs2k1', 'category': 'Clothing>>Look-selection'},
    {'sex': 'women', 'uri': 't1r3os5i', 'category': 'Clothing>>Louis-vuitton-x-yayoi-kusama-clothing'},
    {'sex': 'men', 'uri': 't1u9ytru', 'category': 'Clothing>>Look-selection'},
    {'sex': 'men', 'uri': 'tyk3w50', 'category': 'Clothing>>Denim-collectio'},
    {'sex': 'men', 'uri': 'tgmiooy', 'category': 'Clothing>>Denim-collection'},
    {'sex': 'men', 'uri': 'tco5zhu', 'category': 'Clothing>>Tailoring'},
    {'sex': 'men', 'uri': 't1uzlmxg', 'category': 'Clothing>>Clothing-louis-vuitton-x-yayoi-kusama-for-men'},
    {'sex': 'women', 'uri': 'to8aw9x', 'category': 'Clothing>>All-ready-to-wear'},
    {'sex': 'women', 'uri': 't12kgz5u', 'category': 'Clothing>>Coats-and-jackets'},
    {'sex': 'women', 'uri': 't1qw5yu7', 'category': 'Clothing>>Knitwear'},
    {'sex': 'women', 'uri': 't1m1g0yp', 'category': 'Clothing>>Tops'},
    {'sex': 'women', 'uri': 't17aneaj', 'category': 'Clothing>>Dresses'},
    {'sex': 'women', 'uri': 't79p2ft', 'category': 'Clothing>>Pants'},
    {'sex': 'women', 'uri': 't1ho800m', 'category': 'Clothing>>Skirts-and-shorts'},
    {'sex': 'women', 'uri': 't1y27qn9', 'category': 'Clothing>>Swimwear'},
    {'sex': 'men', 'uri': 'tmfgzj3', 'category': 'Clothing>>All-ready-to-wear'},
    {'sex': 'men', 'uri': 't1epdz97', 'category': 'Clothing>>Outerwear-and-coats'},
    {'sex': 'men', 'uri': 'tpqvyd6', 'category': 'Clothing>>Blazers-and-jackets'},
    {'sex': 'men', 'uri': 'tdylled', 'category': 'Clothing>>Trousers'},
    {'sex': 'men', 'uri': 't1wtp7cj', 'category': 'Clothing>>Shirts'},
    {'sex': 'men', 'uri': 'tq8hduw', 'category': 'Clothing>>Knitwear-and-sweatshirts'},
    {'sex': 'men', 'uri': 'to9uy2x', 'category': 'Clothing>>T-shirts-and-polos'},
    {'sex': 'men', 'uri': 'tvr38rg', 'category': 'Clothing>>Swimwear'}

]
for index, info in enumerate(url_list):
    task = {
        "jobId": index,
        'info': info,
        'domain': 'lv'.upper(),
        'filename': 'main',
        'types': 'electronic_business',
        "scheduleTime": int(time.time() * 1000),
        "triggerChannel": 'SONIC_SPIDER',
    }
    result = filter_push_redis(redis_conn, f'{task["types"]}_{task["filename"]}_{task["domain"]}', task)
    # result = filter_push_redis(redis_shedana, f'{task["types"]}_{task["filename"]}_{task["domain"]}', task)
    print(result)
    # input()
